package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 用户自定义的快捷菜单Entity类
 *
 */
@Entity
@Table(name = "AC_USER_SHORTCUT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AcUserShortcut {

	//属性
	private Long usId;		//主键ID
	private Long userId;	//用户ID
	private Long menuId;	//菜单ID
	private Integer sortNo;	//排列顺序
	
	@Id
    @SequenceGenerator(name="SEQ_AC_USER_SHORTCUT", sequenceName="SEQ_AC_USER_SHORTCUT", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_AC_USER_SHORTCUT")
    public Long getUsId() {
		return usId;
	}

	public void setUsId(Long usId) {
		this.usId = usId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getMenuId() {
		return menuId;
	}

	public void setMenuId(Long menuId) {
		this.menuId = menuId;
	}

	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}